package com.hjrpc.babyyamall.authserver.util;

import org.apache.commons.lang3.RandomUtils;

public class NumberRandomUtil {
    /**
     * 生成随机的数字字符串
     * @param size
     * @return
     */
    public static String getString(int size) {
        StringBuilder sb = new StringBuilder();
        int num = 0;
        for (int i = 0; i < size; i++) {
            num = RandomUtils.nextInt(0, 10);
            sb.append(num);
        }
        return sb.toString();
    }
}
